-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replace context key tupels with records #279
Conversation
Coverage remained the same at 78.329% when pulling c84dc0a2a40d6b4789de4fb8fcb85074d2a44e9e on feature/reg-keys into 22ded94 on master. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
test/ggsn_SUITE.erl
Outdated
@@ -973,9 +973,10 @@ path_failure() -> | |||
[{doc, "Check that Create PDP Context works and " | |||
"that a path failure (Echo timeout) terminates the session"}]. | |||
path_failure(Config) -> | |||
CtxKey = #socket_key{name = 'irx', key = {imsi, ?'IMSI', 5}}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be an idea to define 5 to something more informative.
|
||
{GtpC, _, _} = create_pdp_context(Config), | ||
|
||
{_Handler, Server} = gtp_context_reg:lookup({'irx', {imsi, ?'IMSI', 5}}), | ||
{_Handler, Server} = gtp_context_reg:lookup(CtxKey), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This (1418 + 1422) happens often enough to maybe merit its own function?
Instead of having to count fields in tuples, records allow us to specify matches with the more readable record syntax. They also give us `tagged keys`, that means we can deduce the type of the key from the record tag. This was originally part of the stateless work, but will also be helpful for the cluster registry.
c84dc0a
to
68d4a90
Compare
updated, key types are better differentiated now. |
Instead of having to count fields in tuples, records allow us to
specify matches with the more readable record syntax.
They also give us
tagged keys
, that means we can deduce the typeof the key from the record tag.
This was originally part of the stateless work, but will also be
helpful for the cluster registry.